
#ifndef SLED_SCENE_H 
#define SLED_SCENE_H 

#ifdef __cplusplus
extern "C"{
#endif

/*----------------------------------include-----------------------------------*/
#include <stdint.h>
#include "sled/sled.h"
#include "sclass_port.h"
/*-----------------------------------macro------------------------------------*/

/*----------------------------------typedef-----------------------------------*/
typedef enum
{
    SLED_SCENE_SWITCH_IO_STATE_OFF = 0,
    SLED_SCENE_SWITCH_IO_STATE_ON_1,
    SLED_SCENE_SWITCH_IO_STATE_ON_0
}sled_scene_switch_io_state_t;
typedef struct sled_scene_action
{
    sled_t *sled;
    uint32_t keep_time_ms;
    slde_mode_t sled_mode;
    union {
        struct
        {
            uint16_t pwm_duty;
        }pwm_param;
        struct 
        {
            uint16_t breath_speed;
        }breathe_param;
        struct{
            sled_scene_switch_io_state_t switch_io_state;
        }switch_param;
    };
}sled_scene_action_t;

typedef struct sled_scene
{
    uint32_t                   cur_action_index;
    bool                       is_loop;
    const char                 *scene_name;
    sled_scene_action_t  *actions_array;
}sled_scene_t;

/*----------------------------------variable----------------------------------*/

/*-------------------------------------os-------------------------------------*/

/*----------------------------------function----------------------------------*/
uint32_t sled_scene_handler(sled_scene_t *scene);
/*------------------------------------test------------------------------------*/

#ifdef __cplusplus
}
#endif

#endif	/* SLED_SCENE_H */
